﻿using System.Collections.Specialized;
using System.Configuration;

namespace NMA.Infrastructure.NHibernate.Tests.MockObject
{
    using NMA.Infrastructure.Configuration;    

    public class MockConfiguration : IConfigurationManager
    {
        public NameValueCollection AppSettings
        {
            get 
            {
                return null;
            }
        }

        public string ConnectionStrings(string name)
        {
            return "Data Source=.;Initial Catalog=NMA; Integrated Security=True";
            //return "Data Source=HOME\\SQLEXPRESS;Initial Catalog=NMA; Integrated Security=True";            
        }

        public T GetSection<T>(string sectionName)
        {
            throw new System.NotImplementedException();
        }

        public IConfigurationManager SetConnectionStringName(string name)
        {
            return this;
        }

        public string ProviderName
        {
            get { return _providerName; }
        }

        public string ConnectionString
        {
            get { return _connectionString; }
        }

        private string _providerName = "System.Data.SqlClient";
        private string _connectionString = "Data Source=.;Initial Catalog=NMA; Integrated Security=True";
    }
}